package com.googlecode.jmicroerp.model;

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author alex
 */
@Entity
@Table(name = "produse_vandute")
public class ProdusVandut extends AbstractEntitate {
    private Produs produs;
    private BigDecimal cantitate;
    private BigDecimal pret;
    private Magazin magazin;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PRODUS_ID")
    public Produs getProdus() {
        return produs;
    }

    public void setProdus(Produs produs) {
        this.produs = produs;
    }

    @Column(name = "CANTITATE")
    public BigDecimal getCantitate() {
        return cantitate;
    }

    public void setCantitate(BigDecimal cantitate) {
        this.cantitate = cantitate;
    }

    @Column(name = "PRET")
    public BigDecimal getPret() {
        return pret;
    }

    public void setPret(BigDecimal pret) {
        this.pret = pret;
    }
}
